package com.test;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response;
    
 
public class ClientDemo {

	public static String getBaseURI() {
		return "http://127.0.0.1:8888";
	} 

	public static void main(String[] args) {
		Client client = ClientBuilder.newClient();
		WebTarget target = client.target(getBaseURI());
		test1(target);
		client.close();
	}

	public static void test1(WebTarget target) {
		Response response = target.path("test").path("m1").request().get();

		System.out.println("status:" + response.getStatus() + ",body="
				+ response.readEntity(String.class));
	} 
	
}
